package agents.interaction;

import extra.Position;
import game.constants.ReferenceAgent;
import interfaces.impl.HumanInteraction;

import java.util.ArrayList;

import objects.WorldObject;
import universe.Universe;
import actions.ActionUsePotion;

public class InteractionUsePotion extends HumanInteraction{
	
	WorldObject objectToUsePotion;
	ActionUsePotion actionUsePotion;
	
	Position pos;
	
	@Override
	public void updateChild(WorldObject object, Universe universe, double time) {
		
		actionUsePotion.setSource(object);
		actionUsePotion.setTarget(objectToUsePotion);
		actionUsePotion.setPotion(object);
		actionUsePotion.setUniverse(universe);
		
		universe.setAction(actionUsePotion);
		
		isActive=false;
		
	}

	@Override
	public void initializeActionList() {
		
		listActions= new ArrayList();
		
		actionUsePotion= new ActionUsePotion();
		actionUsePotion.setPriority(priority);
		listActions.add(actionUsePotion);
	}



	@Override
	public void initializeSpecialFeatures() {
		// TODO Auto-generated method stub
		
	}



	@Override
	public void initializeName() {
		name = "Use Potion";
		
	}



	@Override
	public void initializeId() {
		this.id=ReferenceAgent.AGENT_HUMAN_INTERACTION_USE_POTION;
		
	}

	@Override
	public void initializeParametersList() {
		listParameter= new ArrayList();
		
		objectToUsePotion=new WorldObject();
		listParameter.add(objectToUsePotion);
		
		pos = new Position();
		listParameter.add(pos);
	
		
	}
	
	

}
